Monorepo for Tangled tangled.org

appview: pages/templates/repo: fix styling for file tree items #433

merged opened by safwanyp.com targeting master from safwanyp.com/core: repo-tree-styling-fix
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:btuuzzykwikv5aa3nl434f6b/sh.tangled.repo.pull/3lvyxqtnqdh22
+3 -2
Diff #0
+3 -2
appview/pages/templates/repo/tree.html
··· 61 61 62 62 {{ if .IsFile }} 63 63 {{ $icon = "file" }} 64 - {{ $iconStyle = "size-4" }} 64 + {{ $iconStyle = "flex-shrink-0 size-4" }} 65 65 {{ end }} 66 66 <a href="{{ $link }}" class="{{ $linkstyle }}"> 67 67 <div class="flex items-center gap-2"> 68 - {{ i $icon $iconStyle }}{{ .Name }} 68 + {{ i $icon $iconStyle }} 69 + <span class="truncate">{{ .Name }}</span> 69 70 </div> 70 71 </a> 71 72 </div>

History

1 round 2 comments
sign up or login to add to the discussion
safwanyp.com submitted #0
1 commit
expand
appview: pages/templates/repo: fix styling for file tree items
expand 2 comments

Forgot to add a description.

changes:

  • truncated file names using tailwind's truncate utilityy class. had to wrap the file name in a span for this since I've never used template tooling for building UIs ๐Ÿ˜…
  • added a flex-shrink-0 to the icon to maintian their size when the names get too long.

before: long file names could overflow, and icons would get compressed/smaller. after: names are truncated with ellipsis, and icons are sized consistently

thanks for the contributon!

pull request successfully merged